import java.util.Scanner;

public class MainScanner {
	public static int function(int n) {
		int cycle = 1;
		
		while(!(n == 1)) {
			if(n % 2 != 0)
				n = 3 * n + 1;
			else
				n /= 2;
			
			cycle++;
		}
		
		return cycle;
	}
	public static String getMaxCycle(String input) {
		String[] spInput = input.split(" ");
		int i = Integer.parseInt(spInput[0]);
		int j = Integer.parseInt(spInput[1]);
		
		if(i > j) {
			int tmp = i;
			i = j;
			j = tmp;
		}
		
		return getMaxCycle(i, j);
	}
	public static String getMaxCycle(int i, int j) {
		int max = 0;
		
		for( ; i <= j; i++) {
			int curCycle = function(i);
			if(curCycle > max)
				max = curCycle;
		}

		return Integer.toString(max);
	}
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		while(sc.hasNext()) {
			String input = sc.nextLine();
			StringBuffer output = new StringBuffer();
			
			output.append(input + " " + getMaxCycle(input));
			
			System.out.println(output);
		}
	}
}